<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.google.gson.Gson"%>
<%@page import="com.hh.baseframework.util.io.FileUtil"%>
<%@page import="org.apache.struts2.ServletActionContext"%>
<%@page import="com.hh.baseframework.service.impl.BeanFactoryHelper"%>
<%@page import="com.hh.form.bean.HhXtForm"%>
<%@page import="com.hh.form.service.impl.HhXtFormService"%>
<%
	Gson gson = new Gson();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<script type="text/javascript">
var loginUser  = eval('(' + '<%=gson.toJson(session.getAttribute("loginuser"))%>' + ')');
var theme = 'ext-all';
if(loginUser.hhXtZmsx.theme){
	theme = loginUser.hhXtZmsx.theme;
}
</script>
<%@ include file="/common/include/head.jsp"%>
<%@ include file="/common/include/base.jsp"%>
<script type="text/javascript">
var Init = {
		init : function() {
			setTimeout("Init.initHeight();", 100);
		},
		initHeight : function() {
			Ext.override(com.hh.base.BaseWindow, {
				width : BrowserContext.getBrowserWidth() - 300,
				height : BrowserContext.getBrowserHeight() - 80
			});
		}
	}
		static_var.loginuser = eval('(' + '<%=gson.toJson(session.getAttribute("loginuser"))%>' + ')');
		static_var.currOrg = eval('(' + '<%=gson.toJson(session.getAttribute("currOrg"))%>' + ')');
		static_var.pageSize = static_var.loginuser.hhXtZmsx.pageSize;

	Ext.Ajax.on('requestcomplete', function(conn, response, options) {
		if(response.getAllResponseHeaders==null){
			return;
		}
		if (response.getAllResponseHeaders().sessionstatus=='timeout') {
			Login.show({jump:false});
		}else if(response.getAllResponseHeaders().sessionstatus =="no_authority"){
			Ext.example.msg('提示',  "对不起，您没有权限操作此功能！",3000);
		} 
	}, this);
</script>
</head>

<body onLoad="Init.init();">
	<form id="system_open_page_form" method="post" target="_blank">
		<input type="hidden" name="title" id="system_open_page_form_title" />
		<input type="hidden" name="id" id="system_open_page_form_id" /> <input
			type="hidden" name="icon" id="system_open_page_form_icon" /> <input
			type="hidden" name="vsj" id="system_open_page_form_vsj" /> <input
			type="hidden" name="dataListString" id="system_excel_dataListString" />
		<input type="hidden" name="fieldNames" id="system_excel_fieldNames" />
		<input type="hidden" name="headNames" id="system_excel_headNames" />
	</form>
</body>
<script type="text/javascript">
document.title=document.title+'--<%=request.getParameter("title")%>';
Ext.onReady(function() {
	var parmas ={};
	var formDataId = '<%=request.getParameter("formDataId") == null ? "" : request
					.getParameter("formDataId")%>';
	parmas.vsj = '<%=request.getParameter("vsj")%>';
	if(formDataId!=''){
		var hhxtForm = Request.synRequestObject('form-FormWidget-findObjectByDataId',{dataId:formDataId});
		parmas.parentPanel={};
		parmas.parentPanel.hhXtForm=hhxtForm;
		parmas.objectId='<%=request.getParameter("objectId")%>';
		parmas.vsj = 'com.hh.form.actionform.PageEdit';
		parmas.getBtns =function(){return null};
	}
	parmas.id ='<%=request.getParameter("id")%>';
	parmas.title ='<%=request.getParameter("title")%>';
	parmas.icon ='<%=request.getParameter("icon")%>	';
				parmas.addWindow = false;
				parmas.maximizable = false;
				parmas.minimizable = false;
				//parmas.header = false;
				var win = Desktop.openWindow(parmas.vsj, parmas);
				win.maximize();
			});
</script>
</html>
